<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <title>XUL Library</title>
    <style>
      body,td,a,div,.p{font-family:arial,sans-serif}
      div,td{color:#000000}
      a:link,.w,.w a:link{color:#0000cc}
      a:visited{color:#551a8b}
      a:active{color:#ff0000}
    </style>
    <link rel='stylesheet' href='Mantle.css'>
    <script language='javascript' src='JavascriptEditor.nocache.js'></script>
  </head>

  <body>
    <!-- OPTIONAL: include this if you want history support -->
    <iframe src="javascript:''" id="__gwt_historyFrame" style="width:0;height:0;border:0"></iframe>
    <div id="root"></div>

    <script type="text/javascript">

      function showMQLEditor(){
        openMqlEditor(new function(){
          this.onOk = function(json, mqlStr){
            alert(json+"\n\n\n"+mqlStr);
          }
          this.onError = function(err){
            alert(err);
          }
          this.onCancel = function(){
            alert("Canceled");
          }
          this.onReady = function(){}
        });
      }

      function showMQLEditor2(){
//    	   openMqlEditorWithIDs("/org/pentaho/commons/metadata/mqleditor/sampleMql", "Orders", new function(){
         openMqlEditorWithIDs("Steel-Wheels", "Steel-Wheels", new function(){
            this.onOk = function(json, mqlStr){
              alert(json+"\n\n\n"+mqlStr);
            }
            this.onError = function(err){
              alert(err);
            }
            this.onCancel = function(){
              alert("Canceled");
            }
            this.onReady = function(){}
          });
        }
    </script>
    <input type="button" onclick="showMQLEditor()" value="Test"/>
    
    
    
    <input type="button" onclick="showMQLEditor2()" value="Test"/>
  </body>
</html>
